package edu.upc.fulbitofacil.controller;

import edu.upc.fulbitofacil.service.UsuarioService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 *
 * @author gian
 */
@Controller("mainController")
public class MainController {

    @Autowired
    private UsuarioService usuarioService;
    private static Logger log = LoggerFactory.getLogger(MainController.class);

    @RequestMapping("/helloworld")
    public ModelAndView helloWorld() {
        return new ModelAndView("helloWorld", "message",
                usuarioService.saludar("Gian"));
    }
}
